-- GENERATED SPELL FOR [Alumeth the Ascended] --


function spell0_32300(pUnit, Event) --@Mind Flay,n/a--
pUnit:FullCastSpellOnTarget(60472,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32300', 3000, 1)
end

function spell1_32300(pUnit, Event) --@Psychic Scream,Self--
pUnit:FullCastSpellOnTarget(34322,pUnit)
pUnit:RegisterEvent('Sorts_32300', 4337, 1)
end

function spell2_32300(pUnit, Event) --@Renew,Heal--
pUnit:FullCastSpellOnTarget(37978,pUnit)
pUnit:RegisterEvent('Sorts_32300', 15000, 1)
end

function spell3_32300(pUnit, Event) --@Shadow Word: Pain,n/a--
pUnit:FullCastSpellOnTarget(34942,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32300', 18000, 1)
end

function Sorts_32300(pUnit, Event)
local choix_sorts_32300 = math.random(0, 3)
if choix_sorts_32300 == 0 then
pUnit:RegisterEvent('spell0_32300', 1, 1)
end
if choix_sorts_32300 == 1 then
pUnit:RegisterEvent('spell1_32300', 1, 1)
end
if choix_sorts_32300 == 2 then
pUnit:RegisterEvent('spell2_32300', 1, 1)
end
if choix_sorts_32300 == 3 then
pUnit:RegisterEvent('spell3_32300', 1, 1)
end
end

function mob32300_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_32300', math.random(1500, 3000), 1)
end

function mob32300_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob32300_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob32300_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(32300, 1, 'mob32300_Action')
RegisterUnitEvent(32300, 2, 'mob32300_Leave')
RegisterUnitEvent(32300, 3, 'mob32300_Kill')
RegisterUnitEvent(32300, 4, 'mob32300_Die')
